package com.onland.dfish.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.util.Date;

@Data
@Alias("reply")
@TableName("t_reply")
public class Reply {
    /**
     *回复id
     */
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Integer id;
    /**
     *回复id
     */
    @TableField(value = "content")
    private String content;

    /**
     *回复点赞数
     */
    @TableField(value = "like_num")
    private Integer likeNum;

    /**
     *用户id
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     *评论id
     */
    @TableField(value = "comment_id")
    private Integer commentId;

    /**
     *回复添加时间
     */
    @TableField(value = "add_time")
    private Date addTime;

    @Override
    public String toString() {
        return "Reply{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", likeNum=" + likeNum +
                ", userId=" + userId +
                ", commentId=" + commentId +
                ", addTime=" + addTime +
                '}';
    }
}
